﻿using Sidvall.Resources;

namespace XXX.Web.Host.Resources
{
	public class ResourceManager : IResourceProvider
	{
		#region Public Members

		#region GetString

		public string GetString(string key)
		{
			return GetString(key, Properties.Resources.Culture);
		}
		public string GetString(string key, System.Globalization.CultureInfo culture)
		{
			string value;

			if (string.IsNullOrWhiteSpace(key))
				return string.Empty;
			value = Properties.Resources.ResourceManager.GetString(key, culture);
			if (string.IsNullOrWhiteSpace(value))
				return key;
			return value;
		}

		#endregion

		#region ToString

		public override string ToString()
		{
			return "ResourceManager - XXX.Web.Host";
		}

		#endregion

		#endregion
	}
}